package com.sugar.follow.up.module.business.controller.app.publicityeducationcls;

import com.sugar.follow.up.framework.common.pojo.CommonResult;
import com.sugar.follow.up.module.business.controller.admin.publicityeducationcls.vo.PublicityEducationClsRespVO;
import com.sugar.follow.up.module.business.service.publicityeducationcls.PublicityEducationClsService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.annotation.security.PermitAll;
import java.util.List;

import static com.sugar.follow.up.framework.common.pojo.CommonResult.successApp;

@Tag(name = "APP - 宣教分类")
@RestController
@RequestMapping("/biz/publicity-education-cls")
@Validated
public class AppPublicityEducationClsController {

    @Resource
    private PublicityEducationClsService publicityEducationClsService;

    @GetMapping("/all")
    @Operation(summary = "获得所有宣教分类")
    @PermitAll
    public CommonResult<List<PublicityEducationClsRespVO>> getPublicityEducationClsAll() {
        return successApp(publicityEducationClsService.getPublicityEducationClsAll());
    }
}